// @ts-nocheck
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname,'src')
    }
  },
  server: {
      port: '3000',
      host: 'localhost',
      https: false,
      proxy: {
        '/api': {
          target: 'http://127.0.0.1:3009/api',
          changeOrigin: true, // 是否允许跨域
          ws: false,
          rewrite: (path) => path.replace(/^\/api/, '')
        },
      }
  }
})
